<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateStudentsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        /**
         * 报名学生
         */
        Schema::create('students', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name', 191)->comment('幼儿姓名');
            $table->string('school_id', 100)->comment('所属幼儿园');
            $table->string('sex')->nullable()->comment('性别');
            $table->string('nation')->nullable()->comment('民族');
            $table->string('police_station_id', 191)->nullable()->comment('所属派出所');
            $table->string('twins', 191)->comment('多胞胎');
            $table->string('id_code', 191)->comment('身份证号');
            $table->integer('entity_id')->comment('对应实体编号');
            $table->string('relation', 191)->nullable()->comment('幼儿与户主关系');
            $table->string('prophylactic_code', 191)->nullable()->comment('儿童预防接种证号码');
            $table->integer('section_id')->comment('片区号');
            $table->integer('is_enroll')->comment('是否录取');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('students');
    }
}
